#ifndef PROTO_H__
#define PROTO_H__

#define KEYPATH  "/etc/services"
#define KEYPROJ   a
#define PATHMAX  1024
#define DATAMAX  1024

enum{
    MSG_PATH = 1;
    MSG_DATA,
    MSG_EOT
};
typedef struct msg_path_st{           //路径包
    long mtype;      /* must be MSG PATH */
    char path[PATHMAX];       /*ASCIIZ带尾0的串*/
}msg_path_t;

typedef struct msg_data_st{         //数据包
    long mtype;      /* must be MSG DATA */
    char data [DATAMAX] ;
    int datalen;

}msg_data_t;
typedef struct msg_eot_st{        //结束标志包
    long mtype;      /* must be MSG EOT */

}msg_eot_t;

union  msg_s2c_un
{
    /* data */     
    long mtype;          
    msg_data_t datamsg;   //因为不知道到来的是哪种类型的包，所以用共用体来接收 保证接收正确
    msg_eot_t eotmsg
};


#endif